package com.fluagen.example.vertx.syn;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Handler;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;

public class Server extends AbstractVerticle{

	public void start(){
		HttpServer server = vertx.createHttpServer();
		
		
		Handler<HttpServerRequest> handler = h -> {
			HttpServerResponse response = h.response();
			response.putHeader("content-type", "application/json").end("hi syn verticle");
		};
		
		server.requestHandler(handler).listen(8080);
	}
}
